# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: arkhan <arkhan@disroot.org>

pkgname=ueberzug
pkgver=18.2.2
pkgrel=1
pkgdesc='Command line util which allows to display images in combination with X11'
arch=('loong64' 'x86_64')
url=https://github.com/ueber-devel/ueberzug
license=('GPL3')
depends=('libxext' 'libxres' 'python-attrs' 'python-docopt' 'python-pillow')
makedepends=('python-build' 'python-installer' 'python-setuptools'
             'python-wheel')
provides=("python-$pkgname")
replaces=("python-$pkgname")
source=("https://github.com/ueber-devel/ueberzug/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('d8c8593a15eff803c63e36908fedd3d71ceea54f1110041ee2b12a76f52f527a')
b2sums=('dd3fdfe3820ac7344c574ab2031f0217b17a4b4ec4cd59f2447968abb6605a57ee77bab45f943f6d2501ad9c6e5ee3bf4c677f990814d676641bfe314e301dd4')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
